﻿using System;
using System.Runtime.Serialization;

namespace KC.Framework.Base
{
    /// <summary>
    /// 更新业务数据时参数对象
    /// 1、已设置
    /// </summary>
    [Serializable]
    [DataContract(IsReference = true)]
    public class FlowBusiBase : EntityBase
    {
        /// <summary>
        /// 框架
        /// </summary>
        [DataMember]
        public string TenantName { get; set; }
        /// <summary>
        /// 更新流程的表名
        /// </summary>
        [DataMember]
        public string TableName { get; set; }
        /// <summary>
        /// 审批的数据ID
        /// </summary>
        [DataMember]
        public string WorkId { get; set; }
        /// <summary>
        /// 更新的数据字段(一般应设置成主键字段)
        /// </summary>
        [DataMember]
        public string ColumnName { get; set; }
        /// <summary>
        /// 流程ID(发起时或审批通过但业务控制需回滚审批时使用)
        /// </summary>
        [DataMember]
        public int? FlowId { get; set; }
        /// <summary>
        /// 流程值
        /// </summary>
        [DataMember]
        public int FlowState { get; set; }
        /// <summary>
        /// 配置，ERP系统使用
        /// </summary>
        [DataMember]
        public ErpBusiFlowConfig BusiFlow { get; set; }
        /// <summary>
        /// 是否结束流程，用于流程是否已走完
        /// </summary>
        [DataMember]
        public bool IsFinished { get; set; }
        /// <summary>
        /// 是否需要重新发起审批，用于是否退回到初始判断
        /// </summary>
        [DataMember]
        public bool IsFirstStep { get; set; }
        /// <summary>
        /// 是否是审批不通过
        /// </summary>
        [DataMember]
        public bool IsNotPass { get; set; }
        /// <summary>
        /// 是否是审批操作
        /// </summary>
        [DataMember]
        public bool IsApproving { get; set; }
    }
}
